

import 'package:eplorex/models/notification_msg_model.dart';
import 'package:eplorex/utils/HttpUtil.dart';

class NotificationMsgDao{


  static Future<List<NotificationMsgModel>?> queryUserNotification() async {
    var response =
    await HttpUtil.getInstance().get("/api/user/v1/notification");

    if (response!.statusCode == 200) {
      return (response.data['data'] as List)
          .map((e) => NotificationMsgModel.fromJson(e))
          .toList();
    } else {
      return null;
    }
  }
}